package com.ebupt.migu.music.channel.service.impl;

import com.ebupt.migu.music.channel.mapper.ChannelMapper;
import com.ebupt.migu.music.channel.service.ChannelService;
import com.ebupt.migu.music.common.entity.ResultObject;
import com.ebupt.migu.music.common.exception.StatusEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @description: TODO
 * @author: liuyangyang@ebupt.com
 * @date: 2021/7/23 14:34
 */
@Slf4j
@Service
public class ChannelServiceImpl implements ChannelService {

    @Autowired
    private ChannelMapper channelMapper;

    @Override
    public ResultObject channels() {
        ResultObject res = new ResultObject();
        res.setCode(StatusEnum.SUCCESS.getCode());
        res.setMsg(StatusEnum.SUCCESS.getMsg());
        res.setData(channelMapper.channels());
        return res;
    }
}
